import Vue from 'vue'
import Router from 'vue-router'
import User from '../components/pages/user'//用户管理
import book from '../components/pages/book'//用户管理
import system from '../components/pages/system'//系统资源管理
import Homepage from '../components/layout/homepage'
import bookmgr from '../components/layout/bookmgr'
import Menu from '../components/pages/menu'//菜单管理
import Login from '../components/pages/login'//登录
import Goods from '../components/pages/goods'//商品管理
import Banner from '../components/pages/banner'//轮播图管理
import Kinds from '../components/pages/kinds'//分类管理
import Order from '../components/pages/order'//订单管理
import Customer from '../components/pages/customer'//客户管理
import Text from '../components/pages/text'//客户管理
import Test2 from '../components/pages/test2'//客户管理



Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login
    },
    {
      path: '/homepage',
      name: 'homepage',
      component: Homepage,
      children:[
        {
          path: '/user',
          name: 'user',
          component: User
        },
        {
          path: '/bookmgr',
          name: 'bookmgr',
          component: bookmgr
        },
        {
          path: '/book',
          name: 'book',
          component: book
        },
        {
          path: '/system',
          name: 'system',
          component: system
        },
        {
          path: '/customer',
          name: 'customer',
          component: Customer
        },
        {
          path: '/banner',
          name: 'banner',
          component: Banner
        },
        {
          path: '/goods',
          name: 'goods',
          component: Goods
        },
        {
          path: '/menu',
          name: 'menu',
          component: Menu
        },
        {
          path: '/kinds',
          name: 'kinds',
          component: Kinds
        },
        {
          path: '/order',
          name: 'order',
          component: Order
        },
        {
          path: '/text',
          name: 'text',
          component: Text
        },
        {
          path: '/test2',
          name: 'test2',
          component: Test2
        }
      ]
    },

  ]
})
